Method cannot be called in RDC's current state (Error 40507)

A method has been called that cannot be completed while an AddNew or Edit operation is in progress. For example, you cannot call the Refresh method while the RemoteData control (RDC) is editing an existing row or adding a new row. Make sure AddNew and Edit operations are completed by executing the Update or CancelUpdate method, or by using one of the Move methods before calling the method that caused the error.

For additional information, search the documentation for the method in question.